File path is wierdness

Last post 12-09-2011, 9:42 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  11-24-2011, 2:21 PM 71622

    File path is wierdness

    Hi there

    If I use the uploader and set the file path, why is the file being uploaded to windows temp folder and not deleted fterwards? So I have 2 copies of the file, one in windows/temp and one in the save folder. The temp one should be deleted I think.

    And the FilePath always shows the file path of the temp file, not the saved file. So my only option is to use only the temp filename and move it somewhere else and rename it.

    And yes, the filename is also not correct, it is showing the file name of the original file, not the filename of the temp file, I have to extract this from file path... I don't believe all this is intentional behaviour.

    Am I missing something?

  •  11-25-2011, 6:52 AM 71633 in reply to 71622

    Re: File path is wierdness

    Hi jerry2,
     
    1. The temp file will be delete after 8 hours.
     
    2. Example page "ajax-multiplefiles.asp" shows you how to get the  original file name by the code below
     
        Response.Write(mvcfile.FileName)
     
    3. About the file paht. You have set the save directly, so you already know the save path, what you need to add just add the file name right? #2 shows you how to get the file name.
     
    Regards,
     
    Ken
  •  12-09-2011, 12:00 AM 71904 in reply to 71633

    Re: File path is wierdness

    Yes I only need the filename but the file name is not correct, it shows original file name not the saved one. The saved one is not the same to original, it puts some timestamp behind and change the ending.
  •  12-09-2011, 9:42 AM 71909 in reply to 71904

    Re: File path is wierdness

    HI jerry2,
     
    I suggest you use the "CopyTo" method to save the upload file. In this method you can handle the file name and the file save location.
     
    About the same file name problem, please refer to http://cutesoft.net/forums/thread/59459.aspx.
     
    Regards,
     
    Ken 
View as RSS news feed in XML